<?php

class User extends CI_Controller{
    function __construct() {
        parent::__construct();
        $this->load->model('user_m');
    }
    function insert(){
        $arr=array('name'=>$this->input->post('name'),'pass'=>$this->input->post('pass'),'phone'=>$this->input->post('phone'));
        $this->user_m->insert($arr);
    }
    
    function delete(){
        $this->user_m->delete($this->input->post('id'));
    }
    
    function update(){
        $id=$this->input->post('id');
        $arr=array('name'=>$this->input->post('name'),'pass'=>$this->input->post('pass'),'phone'=>$this->input->post('phone'));
        $this->user_m->update($id,$arr);
    }
    
    function select(){
        //$name=$this->input->post("name");
        //$pass=$this->input->post("pass");
        $name="hhh";
        $pass="123";
        $arr=$this->user_m->select(array('name'=>$name,'pass'=>$pass));
        
    }
}

